<!DOCTYPE html>
<html lang="zh">

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="format-detection" content="telephone=no" />
    <meta charset="UTF-8" />
    <link href="/static/img/navs/favicon.ico" rel="icon" />
    <link href="__STATIC__/css/index.css" rel="stylesheet" />
    <link href="__STATIC__/css/common.css" rel="stylesheet" />
    <link href="__STATIC__/css/element-ui.2.15.12.css" rel="stylesheet" />
    <script src="__STATIC__/js/vue.v2.7.14.js"></script>
    <script src="__STATIC__/js/element-ui.2.15.12.js"></script>
    <script src="__STATIC__/js/axios.min.js"></script>
    <script src="__STATIC__/js/crypto-js.min.js"></script>
    <script src="__STATIC__/js/utils.js"></script>

    <title>1258导航开奖历史记录</title>
</head>

<body>
    <!-- 主题一样的改这个class="theme-grey" -->
    <div id="app" class="theme-zongse" style="height: 100vh;display: none;">
        <!--头部-->
        <div class="header">
            <!--        logo-->
            <div class="logo-container">
                <div class="logo-left">
                    <img src="/static/img/navs/navlogos.png" alt="1258导航历史记录" />
                </div>
                <div class="logo-right">
                    <a href="https://www.125868.com/" target="_blank">
                        <img src="__STATIC__/img/1258_tawgx3.png" alt="1258最快" />
                    </a>
                </div>
            </div>
        </div>
        <div class="main-warp" style="border: 2px solid #382c2c;">
            {if !empty($list)}
            <div class="result-wrapper1">
                <div class="result-tabber">
                    {foreach $list as $key=>$vo}
                        <div class="result-tabber-item" :class="{'active':(activeKey == Number('{$key}'))}" @click="checkTab({$key},'{$vo['alias']}')">{$vo['title']}</div>
                       
                    {/foreach}
                </div>
            </div>
            {/if}
            <div class="result-main" v-for="(item,inx) in list" :key=""inx>
                <div class="result-main-text">{{item.title}} -  第 <strong class="color-red">{{item.issue}}</strong> 期： <span>{{item.open_time}}</span></div>
                <div class="result-container">
                    <template v-for="(fv,fk) in item.open_code">
                        <div class="result-list result-list-jia" :key="fk" v-if="fk == 6">
                            <p class="color-red bgcolor-yellow"> + </p>
                        </div>
                        <div class="result-list"  :key="fk">
                            <p class="color-white" :class="'bgcolor-'+fv.color">{{fv.nub}}</p>
                            <p>{{item.open_xiao[fk] || '?'}}</p>
                        </div>
                    </template>
                </div>
                <div v-if="item.open_time == '2024-02-10 21:30:00'" class="result-main-text color-red bgcolor-yellow jingshi">从 【{{item.issue}}期】开始启用新的生肖号码顺序，祝全体彩民新年快乐、阖家幸福。</div>
            </div>

        </div>
    </div>
</body>
<script>
    new Vue({
      el: "#app",
      data() {
        return {
            alias:'{$alias}',
            list:[],
            activeKey:0,
        }
      },
      mounted() {
        this.getIp();
        this.initDraw()
        document.getElementById('app').style.display = 'block';
  
      },
      methods: {
        initDraw() {
            if(!this.alias) {
                return false;
            }
            this.list = [];
            axios.post('/drawp',{alias:this.alias}).then(res => {
                this.loading = false;
                if(res.data.code == 200) {
                    var _data = aesDecrypt(res.data.data,res.data.sig);
                    this.list = _data.list;
                }else{
                    this.$message({ message: res.data.message, type: 'error' });
                }
            });
        },
        checkTab(key,alias) {
            this.activeKey = key;
            this.alias = alias;
            this.initDraw();
        },
        getIp(){
            axios.get('https://api.ipify.org?format=json').then(res => {
                this.ip = res.data.ip;
                this.ajaxtongji();
            });
            
        },
        tongji(){
            setTimeout(()=>{
            this.ajaxtongji();
            },10000);
        },
        ajaxtongji(){
            var newuid = '{$uuid}';
            var uuid = window.sessionStorage.getItem('_uuid_');
            if(!uuid) {
                uuid = newuid;
                window.sessionStorage.setItem('_uuid_',uuid);
            }
            
            var map = {
                    uuid:uuid,
                    newuid:newuid,
                    origin : window.location.origin + window.location.pathname,
                    referer:document.referrer,
                    keyword:route(),
                    ipstring:this.ip
            }
            axios.post('/tongji',map).then(res => {
                if(res.data.code == 200) {
                // var _data = aesDecrypt(res.data.data,res.data.sig);
                    this.tongji();
                }
            });
        }
      }
    });
  </script>
</html>